package com.mmlc.meimei.lichengkongjian.mine;

import android.content.Intent;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;

import com.mmlc.inter.InterActivity;
import com.mmlc.meimei.lichengkongjian.Adapter.SendTraceAdapter;
import com.mmlc.meimei.lichengkongjian.R;
import com.mmlc.meimei.lichengkongjian.been.SendTraceBean;

import butterknife.ButterKnife;
import butterknife.InjectView;

public class ActivityShopSendTrace extends InterActivity {


    @InjectView(R.id.tv_sendStateNone)
    TextView tvSendStateNone;
    @InjectView(R.id.tv_sendState)
    TextView tvSendState;
    @InjectView(R.id.tv_sendNumber)
    TextView tvSendNumber;
    @InjectView(R.id.tv_infoSource)
    TextView tvInfoSource;
    @InjectView(R.id.lv_list)
    ListView lvList;


    public SendTraceBean itemBean;
    @Override
    protected int initContentView() {
        return R.layout.activity_shopsendtrace;
    }

    @Override
    protected void initView() {
        ButterKnife.inject(this);
        processData();
    }

    private void processData() {

        Intent intent = getIntent();
        itemBean = intent.getParcelableExtra("traceBean");

        initUI();
    }

    public void doBack(View view){
        finish();
    }
    private void initUI() {

        tvSendNumber.setText("运单号: "+itemBean.sendNumber);
        tvInfoSource.setText("物流公司: "+itemBean.infoSource);

        SendTraceAdapter adapter = new SendTraceAdapter(this,lvList,itemBean.listTraceBean );
        lvList.setAdapter(adapter);
    }

    @Override
    protected void initEvent() {

    }
}
